<!DOCTYPE html> 
<html>
	<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1"> 
	<title>jQuery Mobile Docs - Theming Forms</title> 
	<link rel="stylesheet"  href="../../css/themes/default/jquery.mobile-1.2.0.css" />
	<link rel="stylesheet" href="../_assets/css/jqm-docs.css"/>

	<script src="../../js/jquery.js"></script>
	<script src="../../docs/_assets/js/jqm-docs.js"></script>
	<script src="../../js/jquery.mobile-1.2.0.js"></script>

</head> 
<body> 

	<div data-role="page" class="type-interior">

		<div data-role="header" data-theme="f">
		<h1>Theming forms</h1>
		<a href="../../" data-icon="home" data-iconpos="notext" data-direction="reverse">Home</a>
		<a href="../nav.html" data-icon="search" data-iconpos="notext" data-rel="dialog" data-transition="fade">Search</a>
	</div><!-- /header -->

	<div data-role="content">
    	<div class="content-primary">
	
    <h2>Form themes</h2>
    <p>jQuery Mobile has a rich <a href="../api/themes.html">theming system</a> that gives you full control of how pages and forms are styled. By default all form elements inside a container will automatically adopt the same theme color swatch as their parent. This allows form elements to blend into their layouts with minimal work. The <code> data-theme</code> attribute can be applied to any individual form element to apply any of the lettered theme color swatches to create contrast and emphasis in your designs.</p> 
    
    <p>All the form elements in the examples below use the same HTML code with no theme swatch specified on the individual form elements. The only difference between each example block code is a <code> data-theme</code> swatch color assigned to each parent container. This illustrates the way form elements automatically adopt the theme swatch of their parent.</p>
			
	<form>
	
	<h2>Body swatch "a"</h2>
	<div class="ui-body ui-body-a">
			
		<div data-role="fieldcontain">
         <label for="name-a">Text Input:</label>
         <input type="text" name="name" id="name-a" value=""  />
		</div>
		
		<div data-role="fieldcontain">
			<label for="switch-a">Flip switch:</label>
			<select name="switch-a" id="switch-a" data-role="slider">
				<option value="off">Off</option>
				<option value="on">On</option>
			</select> 
		</div>
		
		<div data-role="fieldcontain">
			<label for="slider-a">Slider:</label>
		 	<input type="range" name="slider" id="slider-a" value="0" min="0" max="100"  />
		</div>
		
		
		<div data-role="fieldcontain">
		<fieldset data-role="controlgroup" data-type="horizontal">
	    	<legend>Font styling:</legend>
	    	<input type="checkbox" name="checkbox-6a" id="checkbox-6a" class="custom" />
			<label for="checkbox-6a">b</label>

			<input type="checkbox" name="checkbox-7a" id="checkbox-7a" class="custom" />
			<label for="checkbox-7a"><em>i</em></label>

			<input type="checkbox" name="checkbox-8a" id="checkbox-8a" class="custom" />
			<label for="checkbox-8a">u</label>    
	    </fieldset>
		</div>
	
		<div data-role="fieldcontain">
		    <fieldset data-role="controlgroup">
		    	<legend>Choose a pet:</legend>
		         	<input type="radio" name="radio-choice-1" id="radio-choice-1a" value="choice-1" />
		         	<label for="radio-choice-1a">Cat</label>

		         	<input type="radio" name="radio-choice-1" id="radio-choice-2a" value="choice-2"  />
		         	<label for="radio-choice-2a">Dog</label>

		         	<input type="radio" name="radio-choice-1" id="radio-choice-3a" value="choice-3"  />
		         	<label for="radio-choice-3a">Hamster</label>

		         	<input type="radio" name="radio-choice-1" id="radio-choice-4a" value="choice-4"  />
		         	<label for="radio-choice-4a">Lizard</label>
		    </fieldset>
		</div>
		
		<div data-role="fieldcontain">
			<label for="select-choice-a" class="select">Choose shipping method:</label>
			<select name="select-choice-a" id="select-choice-a">
				<option value="standard">Standard: 7 day</option>
				<option value="rush">Rush: 3 days</option>
				<option value="express">Express: next day</option>
				<option value="overnight">Overnight</option>
			</select>
		</div>
		
		</div><!-- /body-a -->
		
		<h2>Body swatch "b"</h2>
		<div class="ui-body ui-body-b">

			<div data-role="fieldcontain">
	         <label for="name-b">Text Input:</label>
	         <input type="text" name="name" id="name-b" value=""  />
			</div>

			<div data-role="fieldcontain">
				<label for="switch-b">Flip switch:</label>
				<select name="switch-b" id="switch-b" data-role="slider">
					<option value="off">Off</option>
					<option value="on">On</option>
				</select> 
			</div>

			<div data-role="fieldcontain">
				<label for="slider-b">Slider:</label>
			 	<input type="range" name="slider" id="slider-b" value="0" min="0" max="100"  />
			</div>


			<div data-role="fieldcontain">
			<fieldset data-role="controlgroup" data-type="horizontal">
		    	<legend>Font styling:</legend>
		    	<input type="checkbox" name="checkbox-6b" id="checkbox-6b" class="custom" />
				<label for="checkbox-6b">b</label>

				<input type="checkbox" name="checkbox-7b" id="checkbox-7b" class="custom" />
				<label for="checkbox-7b"><em>i</em></label>

				<input type="checkbox" name="checkbox-8b" id="checkbox-8b" class="custom" />
				<label for="checkbox-8b">u</label>    
		    </fieldset>
			</div>

			<div data-role="fieldcontain">
			    <fieldset data-role="controlgroup">
			    	<legend>Choose a pet:</legend>
			         	<input type="radio" name="radio-choice-1" id="radio-choice-1b" value="choice-1" />
			         	<label for="radio-choice-1b">Cat</label>

			         	<input type="radio" name="radio-choice-1" id="radio-choice-2b" value="choice-2"  />
			         	<label for="radio-choice-2b">Dog</label>

			         	<input type="radio" name="radio-choice-1" id="radio-choice-3b" value="choice-3"  />
			         	<label for="radio-choice-3b">Hamster</label>

			         	<input type="radio" name="radio-choice-1" id="radio-choice-4b" value="choice-4"  />
			         	<label for="radio-choice-4b">Lizard</label>
			    </fieldset>
			</div>

			<div data-role="fieldcontain">
				<label for="select-choice-b" class="select">Choose shipping method:</label>
				<select name="select-choice-b" id="select-choice-b">
					<option value="standard">Standard: 7 day</option>
					<option value="rush">Rush: 3 days</option>
					<option value="express">Express: next day</option>
					<option value="overnight">Overnight</option>
				</select>
			</div>

			
			</div><!-- /body-b -->


			<h2>Body swatch "c"</h2>
			<div class="ui-body ui-body-c">

				<div data-role="fieldcontain">
		         <label for="name-c">Text Input:</label>
		         <input type="text" name="name" id="name-c" value=""  />
				</div>

				<div data-role="fieldcontain">
					<label for="switch-c">Flip switch:</label>
					<select name="switch-c" id="switch-c" data-role="slider">
						<option value="off">Off</option>
						<option value="on">On</option>
					</select> 
				</div>

				<div data-role="fieldcontain">
					<label for="slider-c">Slider:</label>
				 	<input type="range" name="slider" id="slider-c" value="0" min="0" max="100"  />
				</div>


				<div data-role="fieldcontain">
				<fieldset data-role="controlgroup" data-type="horizontal">
			    	<legend>Font styling:</legend>
			    	<input type="checkbox" name="checkbox-6c" id="checkbox-6c" class="custom" />
					<label for="checkbox-6c">b</label>

					<input type="checkbox" name="checkbox-7c" id="checkbox-7c" class="custom" />
					<label for="checkbox-7c"><em>i</em></label>

					<input type="checkbox" name="checkbox-8c" id="checkbox-8c" class="custom" />
					<label for="checkbox-8c">u</label>    
			    </fieldset>
				</div>

				<div data-role="fieldcontain">
				    <fieldset data-role="controlgroup">
				    	<legend>Choose a pet:</legend>
				         	<input type="radio" name="radio-choice-1" id="radio-choice-1c" value="choice-1" />
				         	<label for="radio-choice-1c">Cat</label>

				         	<input type="radio" name="radio-choice-1" id="radio-choice-2c" value="choice-2"  />
				         	<label for="radio-choice-2c">Dog</label>

				         	<input type="radio" name="radio-choice-1" id="radio-choice-3c" value="choice-3"  />
				         	<label for="radio-choice-3c">Hamster</label>

				         	<input type="radio" name="radio-choice-1" id="radio-choice-4c" value="choice-4"  />
				         	<label for="radio-choice-4c">Lizard</label>
				    </fieldset>
				</div>

				<div data-role="fieldcontain">
					<label for="select-choice-c" class="select">Choose shipping method:</label>
					<select name="select-choice-c" id="select-choice-c">
						<option value="standard">Standard: 7 day</option>
						<option value="rush">Rush: 3 days</option>
						<option value="express">Express: next day</option>
						<option value="overnight">Overnight</option>
					</select>
				</div>

				
				</div><!-- /body-c -->
				
				
				
				<h2>Body swatch "d"</h2>
				<div class="ui-body ui-body-d">

					<div data-role="fieldcontain">
			         <label for="name-d">Text Input:</label>
			         <input type="text" name="name" id="name-d" value=""  />
					</div>

					<div data-role="fieldcontain">
						<label for="switch-d">Flip switch:</label>
						<select name="switch-d" id="switch-d" data-role="slider">
							<option value="off">Off</option>
							<option value="on">On</option>
						</select> 
					</div>

					<div data-role="fieldcontain">
						<label for="slider-d">Slider:</label>
					 	<input type="range" name="slider" id="slider-d" value="0" min="0" max="100"  />
					</div>


					<div data-role="fieldcontain">
					<fieldset data-role="controlgroup" data-type="horizontal">
				    	<legend>Font styling:</legend>
				    	<input type="checkbox" name="checkbox-6d" id="checkbox-6d" class="custom" />
						<label for="checkbox-6d">b</label>

						<input type="checkbox" name="checkbox-7d" id="checkbox-7d" class="custom" />
						<label for="checkbox-7d"><em>i</em></label>

						<input type="checkbox" name="checkbox-8d" id="checkbox-8d" class="custom" />
						<label for="checkbox-8d">u</label>    
				    </fieldset>
					</div>

					<div data-role="fieldcontain">
					    <fieldset data-role="controlgroup">
					    	<legend>Choose a pet:</legend>
					         	<input type="radio" name="radio-choice-1" id="radio-choice-1d" value="choice-1" />
					         	<label for="radio-choice-1d">Cat</label>

					         	<input type="radio" name="radio-choice-1" id="radio-choice-2d" value="choice-2"  />
					         	<label for="radio-choice-2d">Dog</label>

					         	<input type="radio" name="radio-choice-1" id="radio-choice-3d" value="choice-3"  />
					         	<label for="radio-choice-3d">Hamster</label>

					         	<input type="radio" name="radio-choice-1" id="radio-choice-4d" value="choice-4"  />
					         	<label for="radio-choice-4d">Lizard</label>
					    </fieldset>
					</div>

					<div data-role="fieldcontain">
						<label for="select-choice-d" class="select">Choose shipping method:</label>
						<select name="select-choice-d" id="select-choice-d">
							<option value="standard">Standard: 7 day</option>
							<option value="rush">Rush: 3 days</option>
							<option value="express">Express: next day</option>
							<option value="overnight">Overnight</option>
						</select>
					</div>

				
					</div><!-- /body-d -->


					<h2>Body swatch "e"</h2>
					<div class="ui-body ui-body-e">

						<div data-role="fieldcontain">
				         <label for="name-e">Text Input:</label>
				         <input type="text" name="name" id="name-e" value=""  />
						</div>

						<div data-role="fieldcontain">
							<label for="switch-e">Flip switch:</label>
							<select name="switch-e" id="switch-e" data-role="slider">
								<option value="off">Off</option>
								<option value="on">On</option>
							</select> 
						</div>

						<div data-role="fieldcontain">
							<label for="slider-e">Slider:</label>
						 	<input type="range" name="slider" id="slider-e" value="0" min="0" max="100"  />
						</div>


						<div data-role="fieldcontain">
						<fieldset data-role="controlgroup" data-type="horizontal">
					    	<legend>Font styling:</legend>
					    	<input type="checkbox" name="checkbox-6e" id="checkbox-6e" class="custom" />
							<label for="checkbox-6e">b</label>

							<input type="checkbox" name="checkbox-7e" id="checkbox-7e" class="custom" />
							<label for="checkbox-7e"><em>i</em></label>

							<input type="checkbox" name="checkbox-8e" id="checkbox-8e" class="custom" />
							<label for="checkbox-8e">u</label>    
					    </fieldset>
						</div>

						<div data-role="fieldcontain">
						    <fieldset data-role="controlgroup">
						    	<legend>Choose a pet:</legend>
						         	<input type="radio" name="radio-choice-1" id="radio-choice-1e" value="choice-1" />
						         	<label for="radio-choice-1e">Cat</label>

						         	<input type="radio" name="radio-choice-1" id="radio-choice-2e" value="choice-2"  />
						         	<label for="radio-choice-2e">Dog</label>

						         	<input type="radio" name="radio-choice-1" id="radio-choice-3e" value="choice-3"  />
						         	<label for="radio-choice-3e">Hamster</label>

						         	<input type="radio" name="radio-choice-1" id="radio-choice-4e" value="choice-4"  />
						         	<label for="radio-choice-4e">Lizard</label>
						    </fieldset>
						</div>

						<div data-role="fieldcontain">
							<label for="select-choice-e" class="select">Choose shipping method:</label>
							<select name="select-choice-e" id="select-choice-e">
								<option value="standard">Standard: 7 day</option>
								<option value="rush">Rush: 3 days</option>
								<option value="express">Express: next day</option>
								<option value="overnight">Overnight</option>
							</select>
						</div>

					
						</div><!-- /body-e -->

		</form>
		
		</div><!--/content-primary -->		

		<div class="content-secondary">

			<div data-role="collapsible" data-collapsed="true" data-theme="b" data-content-theme="d">

					<h3>More in this section</h3>

					<ul data-role="listview" data-theme="c" data-dividertheme="d">

						<li data-role="list-divider">Form elements</li>
						<li><a href="docs-forms.html">Form basics</a></li>
						<li><a href="forms-all.html">Form element gallery</a></li>
						<li><a href="forms-all-mini.html">Mini form element gallery</a></li>
            			<li><a href="textinputs/">Text inputs</a></li>
						<li><a href="search/">Search inputs</a></li>
						<li><a href="slider/">Slider</a></li>
						<li><a href="switch/">Flip toggle switch</a></li>
						<li><a href="radiobuttons/">Radio buttons</a></li>
						<li><a href="checkboxes/">Checkboxes</a></li>
						<li><a href="selects/">Select menus</a></li>
						<li data-theme="a"><a href="forms-themes.html">Theming forms</a></li>
						<li><a href="forms-all-native.html">Native form elements</a></li>
						<li><a href="forms-sample.html">Submitting forms</a></li>
						

					</ul>
			</div>
		</div>		

	</div><!-- /content -->

	<div data-role="footer" class="footer-docs" data-theme="c">
		<p class="jqm-version"></p>
		<p>&copy; 2012 jQuery Foundation and other contributors</p>
	</div>

	</div><!-- /page -->

	</body>
	</html>
